﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using NoidungComponent.DAL;
namespace NoidungComponent.BLL
{
    public class Noidung:INoidung
    {
        #region properties
        public NoidungDAL noidungDAL;

        private int _noi_dung_id;

        public int Noi_dung_id
        {
            get { return _noi_dung_id; }
            set { _noi_dung_id = value; }
        }
        private int _chu_de_id;

        public int Chu_de_id
        {
            get { return _chu_de_id; }
            set { _chu_de_id = value; }
        }
        private string _ma;

        public string Ma
        {
            get { return _ma; }
            set { _ma = value; }
        }

        private string _tieude;

        public string Tieude
        {
            get { return _tieude; }
            set { _tieude = value; }
        }
        private string _anh;

        public string Anh
        {
            get { return _anh; }
            set { _anh = value; }
        }

        private string _mieuta;

        public string Mieuta
        {
            get { return _mieuta; }
            set { _mieuta = value; }
        }
        private string _noidung;

        public string Noi_dung
        {
            get { return _noidung; }
            set { _noidung = value; }
        }

        private string _url;

        public string Url
        {
            get { return _url; }
            set { _url = value; }
        }

        private string _ngaytao;

        public string Ngaytao
        {
            get { return _ngaytao; }
            set { _ngaytao = value; }
        }
        
        #endregion

        #region Method
        public Noidung()
        {
            noidungDAL = new NoidungDAL();
        }
        public void Get()
        {
            noidungDAL.Get(this);
        }

        public int Add()
        {
            return noidungDAL.Add(this);
        }
        public void Update()
        {
            noidungDAL.Update(this);
        }
        public void Delete()
        {
            noidungDAL.Delete(this);
        }
        public List<Noidung> GetAll(int currentPage, int pageSize, out int total, string tieude, string column_sort, string type_sort)
        {
            return noidungDAL.GetAll(currentPage, pageSize, out total, tieude, column_sort, type_sort);
        }
        #endregion
    }
}
